<?php
/**
 * Niushop商城系统 - 团队十年电商经验汇集巨献!
 * =========================================================
 * Copy right 2019-2029 上海牛之云网络科技有限公司, 保留所有权利。
 * ----------------------------------------------
 * 官方网址: https://www.niushop.com
 * =========================================================
 */

namespace addon\goodscircle\event;

use addon\goodscircle\model\Config;
use addon\goodscircle\model\GoodsCircle;

/**
 * 活动展示
 */
class OrderPay
{

    /**
     * 订单支付
     * @param array $param
     */
    public function handle($param = [])
    {
        $config_model = new Config();
        $config = $config_model->getGoodscircleConfig($param[ 'site_id' ])[ 'data' ];
        if (isset($config[ 'is_use' ]) && $config[ 'is_use' ]) {
            $goods_circle = new GoodsCircle($param[ 'site_id' ]);
            $goods_circle->importOrder($param[ 'order_id' ]);
        }
    }
}